package lab01;

public class Test11 {
    public static void main(String[] args) {
        int line = 0;
        for (int i = 1;i <= 100;i++) {                  //限制范围为1~100
            int num=0;                                  //记录能被整除的数的数量
            for (int j = 1;j<=i/2;j++) {  //
                if (i%j == 0) {
                    num = num +1;
                }
            }
            if (num == 1) {                             //判断是否为素数
                System.out.print(i + "  ");
                line = line +1;
                if (line%5 == 0) {                      //控制每行输出5个数
                    System.out.println();
                }
            }

        }
    }
}
